//
//  YSShareModel.h
//  newYueLvHui
//
//  Created by Apple on 2020/9/12.
//  Copyright © 2020 Facebook. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    YS_WXSession          = 0,   /**< 聊天界面>  */
    YS_WXTimeline         = 1,   /**< 朋友圈>     */
    YS_WXMinProgram       = 2,   /**< 小程序>     */
    YS_CopyLink           = 3,   /**< 复制链接>  */
    YS_Placard            = 4,   /**< 生成海报>  */
    YS_SavePhoto          = 5,   /**< 保存相册>  */
    YS_Other              = 999, /**<自定义类型>  */
} YSSharePlatformType;


typedef enum : NSUInteger {
    YS_WXMiniProgramTypeRelease = 0,   //正式版
    YS_WXMiniProgramTypeTest    = 1,   //测试版
    YS_WXMiniProgramTypePreview = 2    //体验版
} YS_WXMiniProgramType;


@interface YSShareModel : NSObject

/// 分享平台图标
@property (nonatomic,copy) NSString *imgName;
/// 分享平台名称
@property (nonatomic,copy) NSString *title;

@property (nonatomic,assign) YSSharePlatformType platformType;

+ (instancetype)shareModelWithPlatformType:(YSSharePlatformType)type;

@end



@interface YSShareMessageModel : NSObject

/// 标题
@property (nonatomic,copy) NSString *title;
/// 描述
@property (nonatomic,copy) NSString *desc;
/// 拷贝链接
@property (nonatomic,copy) NSString *copyed_link;
/// 海报链接
@property (nonatomic,copy) NSString *placard_url;
/// 海报图
@property (nonatomic,strong) UIImage *placardImage;

@end


@interface YSShareImageModel : YSShareMessageModel

/// 图片二进制
@property (nonatomic,strong) NSData *imageData;

@end


@interface YSShareWebLinkModel : YSShareMessageModel

/// 网页链接
@property (nonatomic,copy) NSString *webpageUrl;
/// 缩略图
@property (nonatomic,strong) UIImage *thumbImage;

@end


@interface YSShareMinProgramModel : YSShareMessageModel
/// 网页链接
@property (nonatomic,copy) NSString *webpageUrl;
/// 小程序原始id
@property (nonatomic,copy) NSString *userName;
/// 小程序页面路径
@property (nonatomic,copy) NSString *path;
/// 小程序新版本预览图
@property (nonatomic,strong) NSData *hdImageData;
/// 是否携带shareTicket分享
@property (nonatomic,assign) BOOL withShareTicket;
/// 小程序版本类型
@property (nonatomic,assign) YS_WXMiniProgramType miniprogramType;

@end

NS_ASSUME_NONNULL_END
